<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>用户列表</title>
<script type='text/javascript' src='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>
<link href='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/hdjs/hdui/css/hdui.css' rel='stylesheet' media='screen'>
<script src='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/hdjs/hdui/js/hdui.js'></script>
<link href='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/hdjs/hdvalidate/css/hdvalidate.css' rel='stylesheet' media='screen'>
<script src='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/hdjs/hdvalidate/js/hdvalidate.js'></script>
<script src='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/cal/lhgcalendar.min.js'></script>
<script src='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/hdjs/hdslide/js/hdslide.js'></script>
<script type='text/javascript'>
HOST = 'http://localhost';
ROOT = 'http://localhost/gks/1113/shop';
WEB = 'http://localhost/gks/1113/shop/index.php';
URL = 'http://localhost/gks/1113/shop/index.php/Admin/User/index';
APP = 'http://localhost/gks/1113/shop/HSHOP';
COMMON = 'http://localhost/gks/1113/shop/HSHOP/Common';
HDPHP = 'http://localhost/gks/1113/hdphp/hdphp';
HDPHPDATA = 'http://localhost/gks/1113/hdphp/hdphp/Data';
HDPHPEXTEND = 'http://localhost/gks/1113/hdphp/hdphp/Extend';
MODULE = 'http://localhost/gks/1113/shop/index.php/Admin';
CONTROLLER = 'http://localhost/gks/1113/shop/index.php/Admin/User';
ACTION = 'http://localhost/gks/1113/shop/index.php/Admin/User/index';
STATIC = 'http://localhost/gks/1113/shop/Static';
HDPHPTPL = 'http://localhost/gks/1113/hdphp/hdphp/Lib/Tpl';
VIEW = 'http://localhost/gks/1113/shop/HSHOP/Admin/View';
PUBLIC = 'http://localhost/gks/1113/shop/HSHOP/Admin/View/Public';
CONTROLLERVIEW = 'http://localhost/gks/1113/shop/HSHOP/Admin/View/User';
HISTORY = 'http://localhost/gks/1113/shop/index.php/Admin/Index/index';
</script>
</head>
<body>
	<div class="wrap">
		<div class="title-header">用户列表</div>
		<table class="table1">
			<tr>
				<td>UID</td>
				<td>用户名</td>
				<td>角色</td>
				<td>状态</td>
				<td>注册时间</td>
				<td>操作</td>
			</tr>
			<?php $hd["list"]["u"]["total"]=0;if(isset($user) && !empty($user)):$_id_u=0;$_index_u=0;$lastu=min(1000,count($user));
$hd["list"]["u"]["first"]=true;
$hd["list"]["u"]["last"]=false;
$_total_u=ceil($lastu/1);$hd["list"]["u"]["total"]=$_total_u;
$_data_u = array_slice($user,0,$lastu);
if(count($_data_u)==0):echo "";
else:
foreach($_data_u as $key=>$u):
if(($_id_u)%1==0):$_id_u++;else:$_id_u++;continue;endif;
$hd["list"]["u"]["index"]=++$_index_u;
if($_index_u>=$_total_u):$hd["list"]["u"]["last"]=true;endif;?>

			<tr>
				<td><?php echo $u['uid'];?></td>
				<td><?php echo $u['username'];?></td>
				<td><?php echo $u['role_name'];?></td>
				<?php if($u['status'] == 1){?>
					<td class="ok"><span class="status" status='1' uid="<?php echo $u['uid'];?>">正常</span></td>
				<?php  }else{ ?>
					<td class="lock"><span class="status" status='0' uid="<?php echo $u['uid'];?>">锁定</span></td>
				<?php }?>	
				<td><?php echo date('Y-m-d',$u['addtime']);?></td>
				<td>
					<a href="<?php echo U('edit',array('uid'=>$u['uid']));?>">编辑</a>
					<a href="<?php echo U('edit',array('uid'=>$u['uid']));?>">删除</a>
				</td>
			</tr>
			<?php $hd["list"]["u"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
		</table>
	</div>
	<style type="text/css">
		.status{cursor: pointer;}
		table.table1 tr .ok{color: green;}
		table.table1 tr .lock{color: red;}
	</style>
	<script type="text/javascript" src="http://localhost/gks/1113/shop/HSHOP/Admin/View/User/js/index.js"></script>
</body>
</html>